﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace MidSoft.Sys.Department
{
    public partial class Show : System.Web.UI.Page
    {
        public string strid = "";
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                if (Request.Params["id"] != null && Request.Params["id"].Trim() != "")
                {
                    strid = Request.Params["id"];
                    int DepartMentId = (ChinaSoft.Common.Input.SetInt(strid));
                    ShowInfo(DepartMentId);
                }
            }
        }

        private void ShowInfo(int DepartMentId)
        {
            ChinaSoft.BLL.Common.Bind bllbind = new ChinaSoft.BLL.Common.Bind();
            System.Data.DataSet ds = bllbind.GetDataSet("DepartMentName,OrganizeName,CreateTime", "V_DepartmentList", "DepartMentId=" + DepartMentId);
            if (ds != null && ds.Tables.Count > 0)
            {
                this.lblOrganzieName.Text = ds.Tables[0].Rows[0]["OrganizeName"].ToString();
                this.lblDepartMentName.Text = ds.Tables[0].Rows[0]["DepartMentName"].ToString();
                this.lblCreateTime.Text = ds.Tables[0].Rows[0]["CreateTime"].ToString();
            }
        }
    }
}